Optimal. Leaf size=44 \[ \sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a+b \coth ^2(x)}}{\sqrt {a+b}}\right )-\sqrt {a+b \coth ^2(x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3751, 455, 52,
65, 214} \begin {gather*} \sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a+b \coth ^2(x)}}{\sqrt {a+b}}\right )-\sqrt {a+b \coth ^2(x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 52
Rule 65
Rule 214
Rule 455
Rule 3751
Rubi steps
\begin {align*} \int \coth (x) \sqrt {a+b \coth ^2(x)} \, dx &=\text {Subst}\left (\int \frac {x \sqrt {a+b x^2}}{1-x^2} \, dx,x,\coth (x)\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {\sqrt {a+b x}}{1-x} \, dx,x,\coth ^2(x)\right )\\ &=-\sqrt {a+b \coth ^2(x)}+\frac {1}{2} (a+b) \text {Subst}\left (\int \frac {1}{(1-x) \sqrt {a+b x}} \, dx,x,\coth ^2(x)\right )\\ &=-\sqrt {a+b \coth ^2(x)}+\frac {(a+b) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}-\frac {x^2}{b}} \, dx,x,\sqrt {a+b \coth ^2(x)}\right )}{b}\\ &=\sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a+b \coth ^2(x)}}{\sqrt {a+b}}\right )-\sqrt {a+b \coth ^2(x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 44, normalized size = 1.00 \begin {gather*} \sqrt {a+b} \tanh ^{-1}\left (\frac {\sqrt {a+b \coth ^2(x)}}{\sqrt {a+b}}\right )-\sqrt {a+b \coth ^2(x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(237\) vs.
\(2(36)=72\).
time = 0.63, size = 238, normalized size = 5.41
method | result | size |
derivativedivides | \(-\frac {\sqrt {b \left (\coth \left (x \right )-1\right )^{2}+2 b \left (\coth \left (x \right )-1\right )+a +b}}{2}-\frac {\sqrt {b}\, \ln \left (\frac {b \left (\coth \left (x \right )-1\right )+b}{\sqrt {b}}+\sqrt {b \left (\coth \left (x \right )-1\right )^{2}+2 b \left (\coth \left (x \right )-1\right )+a +b}\right )}{2}+\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b +2 b \left (\coth \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\coth \left (x \right )-1\right )^{2}+2 b \left (\coth \left (x \right )-1\right )+a +b}}{\coth \left (x \right )-1}\right )}{2}-\frac {\sqrt {b \left (1+\coth \left (x \right )\right )^{2}-2 b \left (1+\coth \left (x \right )\right )+a +b}}{2}+\frac {\sqrt {b}\, \ln \left (\frac {b \left (1+\coth \left (x \right )\right )-b}{\sqrt {b}}+\sqrt {b \left (1+\coth \left (x \right )\right )^{2}-2 b \left (1+\coth \left (x \right )\right )+a +b}\right )}{2}+\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b -2 b \left (1+\coth \left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\coth \left (x \right )\right )^{2}-2 b \left (1+\coth \left (x \right )\right )+a +b}}{1+\coth \left (x \right )}\right )}{2}\) | \(238\) |
default | \(-\frac {\sqrt {b \left (\coth \left (x \right )-1\right )^{2}+2 b \left (\coth \left (x \right )-1\right )+a +b}}{2}-\frac {\sqrt {b}\, \ln \left (\frac {b \left (\coth \left (x \right )-1\right )+b}{\sqrt {b}}+\sqrt {b \left (\coth \left (x \right )-1\right )^{2}+2 b \left (\coth \left (x \right )-1\right )+a +b}\right )}{2}+\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b +2 b \left (\coth \left (x \right )-1\right )+2 \sqrt {a +b}\, \sqrt {b \left (\coth \left (x \right )-1\right )^{2}+2 b \left (\coth \left (x \right )-1\right )+a +b}}{\coth \left (x \right )-1}\right )}{2}-\frac {\sqrt {b \left (1+\coth \left (x \right )\right )^{2}-2 b \left (1+\coth \left (x \right )\right )+a +b}}{2}+\frac {\sqrt {b}\, \ln \left (\frac {b \left (1+\coth \left (x \right )\right )-b}{\sqrt {b}}+\sqrt {b \left (1+\coth \left (x \right )\right )^{2}-2 b \left (1+\coth \left (x \right )\right )+a +b}\right )}{2}+\frac {\sqrt {a +b}\, \ln \left (\frac {2 a +2 b -2 b \left (1+\coth \left (x \right )\right )+2 \sqrt {a +b}\, \sqrt {b \left (1+\coth \left (x \right )\right )^{2}-2 b \left (1+\coth \left (x \right )\right )+a +b}}{1+\coth \left (x \right )}\right )}{2}\) | \(238\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 495 vs.
\(2 (36) = 72\).
time = 0.42, size = 1551, normalized size = 35.25 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a + b \coth ^{2}{\left (x \right )}} \coth {\left (x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.62, size = 51, normalized size = 1.16 \begin {gather*} -\sqrt {b\,{\mathrm {coth}\left (x\right )}^2+a}-2\,\mathrm {atan}\left (\frac {2\,\sqrt {b\,{\mathrm {coth}\left (x\right )}^2+a}\,\sqrt {-\frac {a}{4}-\frac {b}{4}}}{a+b}\right )\,\sqrt {-\frac {a}{4}-\frac {b}{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________